package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.CheckGroup;
import com.itheima.pojo.CheckItem;
import com.itheima.pojo.Role;
import com.itheima.pojo.User;

import java.util.List;
import java.util.Map;

public interface UserMannagementDao {
    public void add(User user);
    public void setUserAndRole(Map<String, Integer> map);
    public Page<CheckGroup> findByCondition(String queryString);
    public User findById(Integer id);
    public void edit(User user);
    public List<User> findAll();
    public List<Role> roleFindAll();
    public List<Integer> findRoleIdsByUserId(Integer userId);
    void deleteByUserId(Integer id);
    void deleteByUserAndRole(Integer userId);

    int findUserByUsername(String username);
}
